<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="${sPname}_approval_process" name="${jComment}审批流程" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="${sPname}_approval" name="${jComment}审批申请" activiti:assignee="${r"${"}applicant}" activiti:formKey="${jPname}ApprovalCheck">
      <documentation>{"businessType":"${jPname}ApprovalCheck","departmentCode":"100002","gatewayName":"gateWay0"}</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="com.yst.workflow.task.listener.NodeTaskListener"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="${sPname}_approval"></sequenceFlow>
    <userTask id="${sPname}_approval_check1" name="基础设施解决方案部" activiti:formKey="${jPname}ApprovalCheck1">
      <documentation>{"businessType":"${jPname}ApprovalCheck1","departmentCode":"100003","gatewayName":"gateWay1"}</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="com.yst.workflow.task.listener.NodeTaskListener"></activiti:taskListener>
      </extensionElements>
    </userTask>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway" default="flow5"></exclusiveGateway>
    <sequenceFlow id="flow3" sourceRef="${sPname}_approval_check1" targetRef="exclusivegateway1"></sequenceFlow>
    <endEvent id="endevent1" name="End">
      <extensionElements>
        <activiti:executionListener event="start" class="com.yst.workflow.task.listener.EndTaskListener"></activiti:executionListener>
      </extensionElements>
    </endEvent>
    <sequenceFlow id="flow4" name="同意" sourceRef="exclusivegateway1" targetRef="endevent1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${r"${"}${jPname}ApprovalCheck1IsApprove==1}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow5" name="驳回" sourceRef="exclusivegateway1" targetRef="${sPname}_approval"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway" default="flow8"></exclusiveGateway>
    <sequenceFlow id="flow6" sourceRef="${sPname}_approval" targetRef="exclusivegateway2"></sequenceFlow>
    <sequenceFlow id="flow7" sourceRef="exclusivegateway2" targetRef="${sPname}_approval_check1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${r"${"}cancel==false}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow8" sourceRef="exclusivegateway2" targetRef="endevent1"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_${sPname}_approval_process">
    <bpmndi:BPMNPlane bpmnElement="${sPname}_approval_process" id="BPMNPlane_${sPname}_approval_process">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="315.0" y="60.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="${sPname}_approval" id="BPMNShape_${sPname}_approval">
        <omgdc:Bounds height="55.0" width="105.0" x="280.0" y="153.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="${sPname}_approval_check1" id="BPMNShape_${sPname}_approval_check1">
        <omgdc:Bounds height="74.0" width="105.0" x="280.0" y="340.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40.0" width="40.0" x="312.0" y="460.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="315.0" y="550.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
        <omgdc:Bounds height="40.0" width="40.0" x="312.0" y="250.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="332.0" y="95.0"></omgdi:waypoint>
        <omgdi:waypoint x="332.0" y="153.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="332.0" y="414.0"></omgdi:waypoint>
        <omgdi:waypoint x="332.0" y="460.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="332.0" y="500.0"></omgdi:waypoint>
        <omgdi:waypoint x="332.0" y="550.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="340.0" y="509.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="352.0" y="480.0"></omgdi:waypoint>
        <omgdi:waypoint x="479.0" y="480.0"></omgdi:waypoint>
        <omgdi:waypoint x="479.0" y="399.0"></omgdi:waypoint>
        <omgdi:waypoint x="479.0" y="180.0"></omgdi:waypoint>
        <omgdi:waypoint x="385.0" y="180.0"></omgdi:waypoint>
        <bpmndi:BPMNLabel>
          <omgdc:Bounds height="14.0" width="24.0" x="399.0" y="461.0"></omgdc:Bounds>
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="332.0" y="208.0"></omgdi:waypoint>
        <omgdi:waypoint x="332.0" y="250.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="332.0" y="290.0"></omgdi:waypoint>
        <omgdi:waypoint x="332.0" y="340.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="312.0" y="270.0"></omgdi:waypoint>
        <omgdi:waypoint x="207.0" y="270.0"></omgdi:waypoint>
        <omgdi:waypoint x="207.0" y="405.0"></omgdi:waypoint>
        <omgdi:waypoint x="207.0" y="567.0"></omgdi:waypoint>
        <omgdi:waypoint x="315.0" y="567.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>